package Demo2;

class MyRunnable implements Runnable{

    @Override
    public void run() {
        System.out.println("hello thread");
    }
}

public class Main2 {
    public static void main(String[] args) {
        Runnable r=new MyRunnable();
        Thread t=new Thread(r);
        t.start();

        System.out.println("hello main");
    }
}
